This is a brief usage tutorial. Lattieceaasy can be run by calling Run(params) where params is a dictionary of parameter values. This returns a run object.
import pylateasy as pe
params = dict(tf=500., kcutoff=10., N=256, checkpoint_interval=.5)
run = pe.Run(params)
Running LATTICEEASY in 2D with N=256, NDIMS=2, checkpoint_interval=0.5, kcutoff=10.0, tf=500.0, ...
Field evolution can be quickly plotted with .plot() method.
run.plot()
Means and variances are stored in corresponding attributes as pandas dataframes.
run.means.head()
| t_pr | phi | chi | |
|---|---|---|---|
| 0 | 0.00 | 1.714534 | 4.219693e-17 |
| 1 | 0.04 | 1.713497 | 3.631969e-17 |
| 2 | 0.08 | 1.710345 | 3.058354e-16 |
| 3 | 0.12 | 1.705013 | 7.384405e-16 |
| 4 | 0.16 | 1.697449 | 8.701842e-16 |
run.variances.head()
| t_pr | phi2 | chi2 | |
|---|---|---|---|
| 0 | 0.00 | 0.000000e+00 | 1.125129e-13 |
| 1 | 0.04 | -2.268775e-08 | 1.130338e-13 |
| 2 | 0.08 | -2.624908e-08 | 1.162312e-13 |
| 3 | 0.12 | -6.045760e-08 | 1.159374e-13 |
| 4 | 0.16 | 3.434144e-08 | 1.134350e-13 |
Energy densities are stored in energies attribute and can be plotted with .energies.plot() method.
run.energies.head()
| t_pr | phi_kinetic | chi_kinetic | phi_gradient | chi_gradient | potential_1 | potential_2 | |
|---|---|---|---|---|---|---|---|
| 0 | 0.000000 | 0.240136 | 7.353299e-12 | 2.327589e-07 | 1.095314e-12 | 0.250000 | 5.741132e-12 |
| 1 | 0.520000 | 0.405281 | 6.626339e-12 | -5.625328e-08 | 1.223171e-12 | 0.157221 | 5.034282e-12 |
| 2 | 1.040000 | 0.416293 | 4.875725e-12 | -4.329187e-08 | 1.624370e-12 | 0.030403 | 3.041589e-12 |
| 3 | 1.559999 | 0.327447 | 3.321233e-12 | 4.685298e-09 | 2.330434e-12 | 0.000491 | 5.941639e-13 |
| 4 | 2.079999 | 0.254840 | 2.806168e-12 | 2.955964e-10 | 2.773799e-12 | 0.000271 | 5.506463e-13 |
run.energies.plot()
Occupation number spectra are stored in the spectra attribute. $n_k$ for $\phi$ and $\chi$ respectively are found in spectra.nk_phi and spectra.nk_chi as pandas pivot tables. Spectra can be plotted with spectra.plot().
run.spectra.plot()
Lattice slices (assuming 2D) are stored in the slices attribute and can be plotted with slices.plot(t) where t is the $t$th slice. By default returns the last slice.
run.slices.plot(10)